//
// Created by JYL on 2023-11-03.
//

#ifndef INC_9_1_HAL_USART_SEND_I2C_H
#define INC_9_1_HAL_USART_SEND_I2C_H

#include "main.h"

void I2CStart(void);
void I2CStop(void);
unsigned char I2CWaitAck(void);
void I2CSendAck(void);
void I2CSendNotAck(void);
void I2CSendByte(unsigned char cSendByte);
unsigned char I2CReceiveByte(void);
void I2CInit(void);

//写24C02
void EEPROM_Write(uint8_t add,uint8_t dat);
//读24C02
uint8_t EEPROM_Read(uint8_t add);
//写MCP4017
void MCP4017_Write(uint8_t val);
//读MCP4017
uint8_t MCP4017_Read(void);

#endif //INC_9_1_HAL_USART_SEND_I2C_H
